package control;

import System.MainControl;
import System.SysMode;
import System.SystemObject;

public class TerminateExamcontrol extends abstractControl{
	private SystemObject container;
	
	public TerminateExamcontrol(){}
	
	@Override
	public boolean sendToServer(Object obj) {
		boolean result = true;
		MainControl.client.send(obj);
		container = (SystemObject) MainControl.client.getResult();
		/**if the server had trouble connecting the database or had returned false*/
		if (container.getMode() == SysMode.NOT_OK)
			return false;
		else 
			return true;
	}

	/**
	 * 
	 * @return container with the last data from the data base
	 */
	public SystemObject GetSysObj()
	{
		return container;
	}


}
